Image evaluation device, image selection device, image evaluation method, recording medium, and program

ABSTRACT

An image evaluation device ( 101 ) properly evaluating the graininess (or roughness) of an image is provided. The blurer ( 102 ) creates a second image b by blurring a first image a. The differentiator ( 103 ) creates a third image c presenting the difference between the first image a and second image b. The pixel value of each pixel of the third image c presents the difference in pixel value between the pixels at the same position in the first image a and second image b. The scanner ( 104 ) scans the pixels contained in the third image c, obtains the differences in pixel value between adjoining pixels, and obtains the respective probabilities of occurrence of the differences. The calculator ( 105 ) calculates the entropy from the obtained, respective probabilities of occurrence of the differences. The outputter ( 106 ) outputs the entropy as the evaluation value of the graininess (or roughness) of the first image.

TECHNICAL FIELD

The present invention relates to an image evaluation device, imageselection device, image evaluation method, recording medium, and programfor properly evaluating the graininess (or roughness) of an image.

BACKGROUND ART

Techniques for evaluating an image have been proposed in the prior art.For example, Patent Literature 1 proposes a technique of objectivelyevaluating an evaluation-target image resulting from processing anoriginal image using entropy. This technique necessitates theun-processed original image as a comparing image in addition to theevaluation-target image.

Additionally, Non Patent Literature 1 reports a study on pseudo-Hilbertscan satisfying the condition that neighboring pixels on a path are alsoneighbors in a rectangular image while going through all pixels of therectangular image for making progress in applications in imagecompression.

CITATION LIST Patent Literature

-   Patent Literature 1: Unexamined Japanese Patent Application Kokai    Publication No. H10-200893.

Non Patent Literature

-   Non Patent Literature 1: Jian Zhang, Sei-ichiro Kamata and Yoshifumi    Ueshige, A Pseudo-Hilbert Scan Algorithm for Arbitrarily-Sized    Rectangle Region, ADVANCES IN MACHINE VISION, IMAGE PROCESSING, AND    PATTERN ANALYSIS, Lecture Notes in Computer Science, Volume    4153/2006, 290-299, DOI: 10, 1007/11821045_(—)31, 2006.

SUMMARY OF INVENTION Technical Problem

However, there is a strong demand for objectively evaluating anevaluation-target image by referring only to the evaluation-target imagewithout comparing with any other comparable image separately prepared.

Furthermore, there is also a demand for finding the graininess of animage without caring for the size of the image in the above evaluation.

The present invention solves the above problems and an exemplaryobjective of the present invention is to provide an image evaluationdevice, image selection device, image evaluation method, recordingmedium, and program for properly evaluating the graininess (orroughness) of an image.

Solution to Problem

The image evaluation device according to a first exemplary aspect of thepresent invention comprises:

a blurer creating a second image by blurring a first image;

a differentiator creating a third image presenting a difference in pixelvalue of each pixel between the first image and the second image;

a scanner scanning pixels contained in the third image, obtainingdifferences in pixel value between adjoining pixels, and obtainingrespective probabilities of occurrence of the obtained differences;

a calculator calculating an entropy from the respective probabilities ofoccurrence of the obtained differences; and

an outputter outputting the entropy as an evaluation value of agraininess of the first image.

Furthermore, in the image evaluation device of the present invention,the scanner can scan the pixels contained in the third image from leftto right and from top to bottom.

Furthermore, in the image evaluation device of the present invention,

the scanner can scan the pixels contained in the third image along aspace-filling curve.

Furthermore, in the image evaluation device of the present invention,

a pixel value of each pixel contained in the third image is a distancebetween a pixel value at a position of that pixel in the first image anda pixel value at a position of that pixel in the second image in a givencolor space.

Furthermore, in the image evaluation device of the present invention,

the difference in pixel value between the adjoining pixels can be adistance between the pixel values of the adjoining pixels in a givencolor space.

The image selection device according to a second exemplary aspect of thepresent invention comprises:

a receiver receiving multiple images depicting an object;

an acquirer acquiring an evaluation value of a graininess of each of themultiple received images from the above-described image evaluation; and

a selector selecting the least rough image from the multiple receivedimages based on the acquired graininess evaluation values.

The image evaluation method according to a third exemplary aspect of thepresent invention is executed by an image evaluation device comprising ablurer, a differentiator, a scanner, a calculator, and an outputter, andcomprises:

a blurring step in which the blurer creates a second image by blurring afirst image;

a differentiation step in which the differentiator creates a third imagepresenting a difference in pixel value of each pixel between the firstimage and the second image;

a scanning step in which the scanner scans pixels contained in the thirdimage, obtains the differences in pixel value between adjoining pixels,and obtains respective probabilities of occurrence of the obtaineddifferences;

a calculation step in which the calculator calculates an entropy fromthe respective probabilities of occurrence of the obtained differences;and

an output step in which the outputter outputs the entropy as anevaluation value of a graininess of the first image.

The computer-readable recording medium according to a fourth exemplaryaspect of the present invention records a program that allows a computerto function as:

a blurer creating a second image by blurring a first image;

a differentiator creating a third image presenting a difference in pixelvalue of each pixel between the first image and the second image;

a scanner scanning pixels contained in the third image, obtaining thedifferences in pixel value between adjoining pixels, and obtainingrespective probabilities of occurrence of the obtained differences;

a calculator calculating an entropy from the respective probabilities ofoccurrence of the obtained differences; and

an outputter outputting the entropy as an evaluation value of agraininess of the first image.

The program according to a fifth exemplary aspect of the presentinvention allows a computer to function as:

a blurer creating a second image by blurring a first image;

a differentiator creating a third image presenting a difference in pixelvalue of each pixel between the first image and the second image;

a scanner scanning the pixels contained in the third image, obtainingthe differences in pixel value between adjoining pixels, and obtainingthe respective probabilities of occurrence of the obtained differences;

a calculator calculating an entropy from the respective probabilities ofoccurrence of the obtained differences; and

an outputter outputting the entropy as an evaluation value of thegraininess of the first image.

The program of the present invention can be recorded on a non-transitorycomputer-readable recording medium such as a compact disc, flexibledisc, hard disc, magneto optical disc, digital video disc, magnetictape, and semiconductor memory. Furthermore, such a recording medium canbe distributed/sold independently from the computer.

Furthermore, the program of the present invention can be loaded andtemporarily recorded on a computer-readable recording medium such as aRAM (random access memory) from the above recording medium and then theCPU (central processing unit) can read, interpret, and execute theprogram recorded on the RAM.

Furthermore, the program of the present invention can bedistributed/sold via a transitory transfer medium such as a computercommunication network independently from the computer on which theprogram runs.

Advantageous Effects of Invention

The present invention can provide an image evaluation device, imageselection device, image evaluation method, recording medium, and programfor properly evaluating the graininess (or roughness) of an image.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1A is an explanatory illustration for explaining an image-scanningpath;

FIG. 1B is an explanatory illustration for explaining an image-scanningpath;

FIG. 1C is an explanatory illustration for explaining an image-scanningpath;

FIG. 2 is an explanatory illustration showing the general configurationof the image evaluation device according to the embodiment;

FIG. 3 is a flowchart showing the control flow in the image evaluationprocedure executed by the image evaluation device according to theembodiment;

FIG. 4A is an explanatory illustration presenting the profile of pixelvalues obtained by scanning a first image a that is a rough imagedepicting an object;

FIG. 4B is an explanatory illustration presenting the profile of pixelvalues obtained by scanning a first image a that is a smooth imagedepicting an object;

FIG. 5A is an explanatory illustration presenting the profile of pixelvalues obtained by scanning a second image b corresponding to the firstimage a shown in FIG. 4A;

FIG. 5B is an explanatory illustration presenting the profile of pixelvalues obtained by scanning a second image b corresponding to the firstimage a shown in FIG. 4B;

FIG. 6A is an explanatory illustration presenting the profile of pixelvalues of a third image c corresponding to the profile of pixel valuesof the first image a shown in FIG. 4A and to the profile of pixel valuesof the second image b shown in FIG. 5A;

FIG. 6B is an explanatory illustration presenting the profile of pixelvalues of a third image c corresponding to the profile of pixel valuesof the first image a shown in FIG. 4B and to the profile of pixel valuesof the second image b shown in FIG. 5B;

FIG. 7 is an explanatory illustration showing the general configurationof the image selection device according to the embodiment; and

FIG. 8 is a flowchart showing the process flow of the image selectionmethod executed by the image selection device.

DESCRIPTION OF EMBODIMENTS

Embodiments of the present invention will be described hereafter. Theembodiments are given for the purpose of explanation and do not confinethe scope of the invention of the present application. Therefore, aperson of ordinary skill in the field may embrace an embodiment in whichsome or all components are replaced with equivalent counterparts andsuch an embodiment falls under the scope of the present invention.

Embodiment 1

The image evaluation device according to the present invention can berealized by running given programs on various kinds of computers such asserver computers and personal computers.

Here, a computer means a piece of hardware on which a CPU runs programsso as to use a RAM as a temporary storage area and/or output destinationof the processing results, receive instruction from a user through aninput device such as a keyboard and mouse, output the processing resultsto an output device such as a display, and communicate with otherdevices via an NIC (network interface card) for the above input/output,and the input/output devices can be omitted as appropriate.

The hard disc or the like of a computer records images to be processedby the CPU in addition to the programs to be run by the CPU. In manycases, the images are managed by means of a file system and variousdatabases along with information regarding the photographer, shootingdate/time, shooting location, and shooting object.

Here, it is possible that multiple computers connected via computercommunication networks including the Internet execute the aboveprocessing in a parallel, distributed, or concurrent manner so as toexpedite the processing of the image evaluation device according to thepresent invention.

Additionally, the image evaluation device of the present invention canbe realized by applying FPGA (field programmable gate array) techniquesor the like to design an electronic circuit base on the programs andconfigure a dedicated electronic circuit.

(Evaluation-Target Image)

This embodiment evaluates the graininess (or roughness) of an image. Theevaluation-target image is a digitally-processable image obtained byphotographing a real object with a digital camera or by scanning a filmor sheet of paper with a scanner.

In the following explanation, an image a has a rectangular shape havinga width of a.W dots and a length of a.H dots and is expressed by a setof a.W×a.H pixels for easier understanding. Starting from the top leftone, the positions of the pixels are referred to as follows. In otherwords, the first element of coordinates presenting a pixel position isdefined on the horizontal axis in the left-to-right direction and thesecond element thereof is defined on the vertical axis in thetop-to-bottom direction.

(0, 0), (1, 0), (2, 0), . . . , (a.W−1, 0),

(0, 1), (1, 1), (2, 1), . . . , (a.W−1, 1),

(0, 2), (1, 2), (2, 2), . . . , (a.W−1, 2),

. . . ,

(0, a.H−2), (1, a.H−2), (2, a.H−2), . . . , (a.W−1, a.H−2),

(0, a.H−1), (1, a.H−1), (2, a.H−1), . . . , (a.W−1, a.H−1).

Furthermore, a pixel value of a pixel contained in the image a atcoordinates (x, y) is denoted by a[x, y].

Each pixel value is expressed by a scalar value in the case of amonochrome image and by a red, green, and blue three-dimensional vectorin the case of a color image. In this embodiment, digital expression isused. For example, the pixel values are integers ranging from 0 to 255in the case of an eight-bit monochrome image. The three, red, green, andblue, pixel values are each an integer ranging from 0 to 255 in the caseof a 24-bit color image.

The absolute value of the difference between the scalar values of thepixel values can be used as the distance between two pixel values in thecase of a monochrome image. In the case of a color image, the distancebetween the vectors of the pixel values (the square root of the squaresum of the differences of red, green, and blue elements), the squaredistance (the square sum of the differences of red, green, and blueelements), or the Manhattan distance (the total of the absolute valuesof the differences of the red, green, and blue) can be used.

Furthermore, a scheme using monochrome images converted from colorimages can be used for the distance between the pixel values of twopixels contained in the color images. In other words, the absolute valueof the difference in a pixel value (scalar value) between two monochromeimages converted from two color images is used as the distance betweenthe pixel values of the two color images.

In the following explanation, the distance between two pixel values pand q is denoted by |p−q|.

In this embodiment, each of the pixels contained in an image is scanned.

In other words, the pixels contained in an image are arranged into aline.

As described above, the image a has a total of a.W×a.H pixels. Then, thecoordinates of a pixel i (i=0, 1, 2, . . . , a.W×a.H−1) after the pixelsare arranged into a line can be obtained by various scanning schemes asdescribed below.

FIGS. 1A, 1B, and 1C are explanatory illustrations for explainingpixel-scanning paths. The following explanation will be made withreference to these figures. In these figures, an image 11 consisting of8×8 pixels is scanned along a path 12 a, 12 b, or 12 c.

The first scheme yields the coordinates (i mod a.W, i div a.W) for apixel i of the image a. Here, x div y means integer division (the resultof dividing x by y) and x mod y means the reminder from the integerdivision (the remainder as a result of dividing x by y). As shown inFIG. 1A, this scheme scans each of the pixels of the image 11 along thepath 12 a. In other words, first, the pixels are scanned horizontallyfrom the left end to the right end. Reaching the right end, downwardshift by one dot is made and then the pixels are scanned horizontallyfrom the left end to the right end. This process is repeated.

With the second scheme, the coordinates of a pixel i of the image a is:

(a) (i mod a.W, i div a.W) when i div (a.W×2) is an even number, and

(b) (a.W−(i mod a.W) −1, i div a.W) when i div (a.W×2) is an odd number.

As shown in FIG. 1B, this scheme scans each of the pixels of the image11 along the path 12 a. In other words, first, the pixels are scannedhorizontally from the left end to the right end. Reaching the right end,downward shift by one dot is made and then the pixels are scanned fromthe right end to the left end. Reaching the left end, downward shift byone dot is made and then the pixels are scanned from the left end to theright end. This process is repeated.

The third scheme utilizes the pseudo-Hilbert scan as disclosed in theNon Patent Literature 1. With the second scheme, the pixels adjoiningeach other in the vertical direction in the image are separated uponscanning. With this scheme, as shown in FIG. 1C, the pixels adjoiningeach other in the horizontal or vertical direction in the image 11 aremore likely and frequently to be proximate on the scan path 12 c than inthe case of FIG. 1B.

In the following explanation, the pixel value of an pixel i on a path 12of scanning the image 11 is denoted by a(i) for easier understanding.

A series of pixel values a(0), a(1), a(2), . . . , a(a.W×a.H−1) obtainedby scanning corresponds to the following pixel values in a differentorder.

a[0, 0], a[1, 0], a[2, 0], . . . a[a.W−1, 0],

a[0, 1], a[1, 1], a[2, 1], . . . a[a.W−1, 1],

a[0, 2], a[1, 2], a[2, 2], . . . a[a.W−1, 2],

. . . ,

a[0, a.H−2], a[1, a.H−2], a[2, a.H−2], . . . a[a.W−1, a.H−2],

a[0, a.H−1], a[1, a.H−1], a[2, a.H−1], . . . a[a.W−1, a.H−1].

(Image Evaluation Device)

FIG. 2 is an explanatory illustration showing the general configurationof the image evaluation device according to this embodiment. FIG. 3 is aflowchart showing the control flow in the image evaluation procedureexecuted by the image evaluation device. The following explanation willbe made with reference to these figures.

An image evaluation device 101 according to this embodiment comprises,as shown in FIG. 2, a blurer 102, a differentiator 103, a scanner 104, acalculator 105, and an outputter 106. The functions of these componentsare realized as a computer executes given programs.

The following explanation will be made on the assumption that the imageevaluation device 101 evaluates a first image a. Furthermore, it isassumed that one of the above-described different scanning paths isselected and applied to all images to be processed.

Here, information on the first image a and all images to be processed asdescribed later is recorded on a recording medium such as a hard disc,transmitted/received or distributed via a computer communicationnetwork, or stored in a temporary storage region of a RAM or the like inorder to carry out various kinds of processing.

First, the blurer 102 blurs the first image a to create a second image bin the image evaluation device 101 (Step S301). Here, the blurring isrealized by applying a so-called smoothing filter to the image.

Here, the first image a and second image b are equal in width andlength.

In other words, a.W=b.W and a.H=b.H are satisfied.

Using the above-described scanning, a simple scheme of smoothing thepixels of the first image a can be as follows. For example, the averageof adjoining pixels is obtained as follows for smoothing:

b(i)←(a(i)+a(i+1))/2, (i=0, 1, . . . ,a.W×a.H−2); and

b(i)←a(i), (i=a.W×a.H−1)

in which the symbol “←” means substituting.

Additionally, the weighted average of a pixel and the pixels immediatelybefore and after it on the path is obtained as follow for smoothing:

b(i)←a(i), (i=0);

b(i)←(a(i−1)+B×a(i)+a(i+1))/(B+2), (i=1,2, . . . ,W×a.H−2); and

b(i)←a(i), (i=a.W×a.H−1)

in which B is a given positive constant.

Two-dimensional smoothing can also be used without using theabove-described scanning schemes. For example, the weighted average of apixel and the pixels immediately above and below it and on its right andleft is obtained as follows for smoothing:

b[x,y]←(a[x−1,y]+a[x+1,y]+a[x,y−1]+a[x,y+1]+B×b[x,y])/(B+4), (x=1,2, . .. ,a.W−2; y=1,2, . . . ,a.H−2); and

b[x,y]←a[x,y], (x=0 or x=a.W−1 or y=0 or y=a.H−1)

in which x and y are integers.

Various other blurring schemes and/or image-smoothing filters areapplicable to the blurring of this step.

Here, in order to obtain the pixel value of the pixel at a desiredposition in the second image b, the above-described schemes makereference to the pixel value of the pixel at the desired position in thefirst image a and additionally make reference to the pixel values aroundthe desired position for obtaining the average. Therefore, differentapproaches are taken for obtaining the average depending on whether thesurroundings around a desired position are all within the first image aor some of them are outside the first image a.

For example, the simplest scheme among the above-described schemesobtains the average between the pixel value at a desired position andthe pixel value at the next position for blurring.

Therefore, if the desired position is situated at the last pixel of thesecond image b, the next position is outside the first image a. Then, insuch a case, the pixel value of the pixel at the last position of thefirst image a is used as it is. This applies to the two other schemes.

FIG. 4A is an explanatory illustration presenting the profile of pixelvalues obtained by scanning the first image a that is a rough imagedepicting the object.

FIG. 4B is an explanatory illustration presenting the profile of pixelvalues obtained by scanning the first image a that is a smooth imagedepicting an object.

FIG. 5A is an explanatory illustration presenting the profile of pixelvalues obtained by scanning the second image b corresponding to thefirst image a shown in FIG. 4A.

FIG. 5B is an explanatory illustration presenting the profile of pixelvalues obtained by scanning the second image b corresponding to thefirst image a shown in FIG. 4B.

The following explanation will be made with reference to these figures.

The horizontal axis of FIGS. 4A, 4B, 5A and 5B presents the order on thescanning path and the vertical axis thereof presents the pixel values ofpixels in this order. In these figures, the pixel values are scalarvalues.

In the image shown in FIG. 4B, the pixel values of the first image achange fairly smoothly.

On the other hand, in the image shown in FIG. 4A, the pixel values ofthe first image a change fairly smoothly except for some occasional,protruding peaks and receded bottoms.

Those correspond to noise upon photographing the image. A higher levelof graininess (or roughness) and lower image quality can be assumed asmore noise is observed.

FIG. 5A presents the pixel values of the second image b obtained bysmoothing the rough first image a according to FIG. 4A and FIG. 5Bpresents the pixel values of the second image b obtained by smoothingthe smooth first image a according to FIG. 4B.

The pixel values in FIGS. 5A and 5B change similarly to each other. Thisis because the peaks and bottoms are moderated by blurring.

Furthermore, the change in pixel value in FIGS. 5A and 5B is similar tothe change in the first image a of FIGS. 4A and 4B as a whole.

The pixel values are added, subtracted, multiplied, and/or divided inthe same calculation fashion as ordinary scalar values and vectorvalues. However, if the elements are normalized to integer values, thefirst image a and second image b can be made equal in size.

Then, the differentiator 103 creates a third image c presenting thedifference between the first image a and second image b (Step S302).

The difference between the first image a and second image b is expressedby the distance between the image values situated at the same positionin the images. Here, the third image c is equal to the first image a andsecond image b in length and width:

a.W=b.W=c.W, a.H=b.H=c.H

The third image c can be created by scanning the pixels along theabove-described paths and obtaining the pixel values of the third imagec as follows:

c(i)←|b(i)−a(i)|, (i=0,1,2, . . . ,a.W×a.H−1).

However, the pixels can be manipulated based on another order. Forexample, the pixels can be manipulated along the rows or columns withinthe image as follows:

c[x,y]←|b[x,y]−a[x,y]|, (x=0,1, . . . ,a.W−1; y=0,1, . . . ,a.H−1)

FIGS. 6A and 6B are explanatory illustrations presenting the profile ofpixel values of the third image c corresponding to the profile of pixelvalues of the first image a shown in FIGS. 4A and 4B and to the profileof pixel values of the second image b shown in FIGS. 5A and 5B. Thefollowing explanation will be made with reference to these figures.

The third image c represented in FIG. 6B is created from the smoothfirst image a, in which almost no peaks and bottoms corresponding to thenoise appear and the pixel values are equal or nearly equal to zero.

On the other hand, the third image c represented in FIG. 6A is createdfrom the rough first image a, in which some protruding peaks and bottomscorresponding to the noise remain. However, the pixel values are equalor nearly equal to zero where there is no noise.

Then, the present invention utilizes entropy for employing the degree ofprotruding and remaining as the evaluation value.

To do so, the scanner 104 scans each of the pixels contained in thethird image c and obtains the probability of occurrence of thedifference in pixel value between adjoining pixels (Step S303).

Here again, the pixels can be scanned along the rows or columns asdescribed above or along a path in sequence as described below. In orderto obtain the probability of occurrence of the difference in pixelvalue, first, the frequency of each pixel value should be obtained. Anarray t is prepared for storing the frequency. The array t can be aone-dimensional array or an associative array. The notation t[x] is usedto access each element of the array t.

Here, if the array t is an ordinary one-dimensional array, the number ofelements can be set to the possible maximum value DMAX of the distancebetween pixel values plus one.

For example, when the first image a and second image b are eight-bitmonochrome images, each pixel value is in a range from 0 to 255. If theabsolute value of the difference in pixel value is used as the distance,each element of the third image c is in a range from 0 to 255, whichmeans an eight-bit monochrome image; then, DMAX=255.

When the first image a and second image b are 24-bit color images andthe square sum of the differences in pixel value of the elements is usedas the distance, DMAX=255×255×3=195075.

In order to obtain the frequency, each of the elements of the array teach must have an initial value of 0. Therefore, when the array t is aone-dimensional array, the following must be executed before countingthe frequency:

t[d]←0, (d=0,1, . . . ,DMAX)

Additionally, the array t can be an associative array using the hash orthe like. The difference in pixel value is mostly nearly equal to zero;therefore, use of the hash or the like allows for efficient memory use.In such a case, the default value of each of the elements of the array tis set to zero.

Here, each of the elements t[x] of the array t should be able to storethe maximum value of the distance between pixel values.

When the first image a is an eight-bit monochrome image, the pixelvalues of the first, second, and third images a, b, and c are expressedby an integer value ranging from 0 to 255. Then, it is sufficient toallocate a one-byte region for each element of the array expressingthose.

On the other hand, the image size can vary to a great extent. As forwidely used image sizes, both the width and height can be expressed by atwo-byte integer. Then, it is sufficient to allocate a four-byte regionfor each element of the array t.

The simplest method of obtaining the frequency consists of countingalong a path as follows:

t[c(i)]←t[c(i)]+1, (i=0,1, . . . ,a.W×a.H−1)

Here, the third image c can be considered to be a one-dimensional arraywhen it is scanned along a path and corresponds to be a two-dimensionalarray when it is viewed as an ordinary image. Therefore, varioustechniques of counting the distribution of the values of the elements ofthe array in parallel or concurrently are applicable.

Once the frequency of the pixel having a difference in pixel value of din each element t[d] of the array t is obtained, the probability ofoccurrence p(d) of the difference d is calculated as follows:

p(d)=t[d]/(a.W×a.H)

Then, the calculator 105 calculates an entropy E from the respectiveprobabilities of occurrence p(d) of the differences obtained for eachdifference d (Step S304).

Here, the set of integer values appearing as the pixel values of thethird image c (the differences in pixel value between the first image aand second image b) is denoted by keys (t). In other words, t[d]>0 whendεkeys (t) is satisfied, and t[d]=0 when dεkeys (t) is not satisfied:

keys(t)={d|dε{0,1, . . . ,DMAX},t[d]>0}

Then, the entropy E can be calculated as follows:

E=−Σ _(dεkeys(t)) p(d)×log(p(d))

The calculation used in the Steps S301 to S303 can all be done withintegers. However, floating decimal point calculation or fixed decimalpoint calculation is used for calculating the entropy because thecalculation of the log (•) involves the natural logarithm or commonlogarithm.

Finally, the outputter 106 outputs the entropy E as the evaluation valueof the graininess (or roughness) of the first image a (Step S305).

As described above, when the first image a is a rough image, peaks andbottoms appear in the pixel values. Then, many different non-zero pixelvalues appear in the third image c. Therefore, the entropy E calculatedas described above is higher. Then, the entropy E can be used as anindicator of the graininess (or roughness) of an image.

The Patent Literature 1 compares an evaluation-target image with theoriginal image to obtain the graininess (or roughness) of theevaluation-target image. On the other hand, this scheme obtains thegraininess (or roughness) of an evaluation-target first image a onlyfrom the first image a.

In other words, this scheme can properly calculate the graininess (orroughness) of an evaluation-target image even if there is no originalimage to make reference to.

Here, the above-described scheme is nearly the same as the scheme ofextracting the outline of an object depicted in an image. Then, thecalculated entropy becomes higher as the object photographed in thefirst image has a complex shape.

However, the entropy components derived from the degree of complexity ofan object shape are nearly at the same level in the comparison ofgraininess (or roughness) between two photographic images of the sameobject.

Furthermore, even in the case of images comprising different numbers ofpixels, the entropy components derived from an object being depicted areat the same level as long as the object occupies each image at the samearea ratio.

Therefore, the graininess (or roughness) can easily be compared betweentwo images by comparing the entropy obtained from the two images as itis.

The above-described embodiment creates from the first image a the secondimage b that is a blurred image of the first image a and the third imagec presenting the difference between the first image a and second imageb, and counts the frequency of occurrence of each pixel value in thethird image c. Therefore, high speed calculation is made possible byusing a CPU or co-processor having multimedia calculation hardwareblurring an image and obtaining the difference.

On the other hand, the pixel value c(i) is the distance between b(i) anda(i) and b(i) can be obtained from the pixel value of a pixel near anpixel i in the first image a. Therefore, it is possible to eliminate theimage storage region for storing the second image b and third image cand reduce the memory usage by directly obtaining each c(i) from thenecessary pixel value of a pixel in the first image a and updating thearray t with the obtained value.

For comparing the quality between images of different sizes, the priorart schemes have to make the images equal in size. However, theabove-described embodiment can compare the image graininess (orroughness) by scanning all pixels and blurring the image withoutdirectly dealing with the image size.

A scheme extensively used with the prior art two-dimensional blurringfilters makes reference to the pixel values of neighboring pixels over Ddots above, below, and to the right and left of a desired position,namely the pixel values of (2×D+1)×(2×D+1) pixels, to obtain theweighted average. Therefore, some filters make the outer borders of thesecond image b smaller than the first image a by D dots. Some filterschange the range of region of an image within which the average iscalculated so as not to change the outer borders of an image in widthand height before and after blurring.

The latter two-dimensional blurring filter can be used with theabove-described embodiment as it is. On the other hand, in order to usethe former two-dimensional blurring filter with the above-describedembodiment, one of the following schemes can be used:

(a) following the blurring, the outer borders of the first image a isremoved by D dots at the top, bottom, right and left to make the firstimage a equal to the second image b in size; or

(b) the pixels corresponding to D dots at the outer borders of thesecond image b are assumed to have the same pixel values as those of thefirst image a.

With the above scheme (a), the pixels corresponding to D dots at theouter borders are present in the first image a but absent in the secondimage b. Then, the above scheme (a) ignores the outer borders uponcalculating the entropy.

On the other hand, the above scheme (b) treats the pixel values ofpixels corresponding to D dots at the outer borders as being equalbetween the first image a and second image b.

Generally, the background is displayed and no important information iscontained at the outer borders of an image in many cases. Furthermore,in the comparison between the number of pixels corresponding to D dotsat the outer borders and the number of the other pixels, the latter isgenerally extremely great. Therefore, even if the above scheme (a) or(b) is used, a satisfactory result as an indicator for evaluating thegraininess (or roughness) of an image can be obtained.

In the above-described embodiment, the pixel value of each pixel of thethird image presents the difference in pixel value between the pixels atthe same position in the first and second images. However, thepositional correspondence can be changed on an arbitrary basis. In otherwords, the difference in pixel value at each position between the firstand second images can be expressed by the pixel at the same position inthe third image; however, it does not need to be the same position.

For example, the difference between the pixels at each position in thefirst and second images can be stored at the pixel in the third image atthe mirror-image position or inverted position with respect to thatposition.

In any case, as a pixel position in the third image is given, thecorresponding pixel position in the first and second images isdetermined.

Therefore, generally, the pixel value of each pixel in the third imagepresents the difference in pixel value between the pixels in the firstand second images at the position corresponding to that pixel.

Embodiment 2

At an electronic shopping mall where multiple store owners exhibit thesame product, the store owners prepare photographic or picture images ofthe product in many cases.

Those images include images prepared by the manufacturer of the productin advance, photographic images shot by store owners with digitalcameras, and images modified by store owners with the addition ofinformation such as a tagline, store logo, or price.

On the other hand, as a user of the electronic shopping mall searchesfor a product, images of the product are displayed on a list of searchresults in many cases. In such a case, it is sometimes desirable thatthe product and a store owner exhibiting the product are combined as onesearch result and a representative image of the product is presented tothe user.

The image evaluation scheme according to the above-described embodimentcan be used to properly select a representative image presenting theproduct when multiple images depicting the product have been prepared.

In other words, a less rough image presumably makes it easier for theuser to view the product and induces the user to favor it.

Furthermore, in the case of the store owner doing some editing such asaddition of a tagline, the image becomes rougher. Therefore, presumably,an image of a faithful copy of the actual product with no editing caneasily be obtained among less rough images.

The image selection device according to this embodiment selects such animage. Here, the image selection device is applicable to select anyimage from multiple images for any purpose. For example, the imageselection device is applicable to automatically select the bestphotographic image after the user successively photographed an objectmultiple times, or to select a frame image representing the video imageamong the frame images of the video image created by arranging multipleframe images in sequence.

The image selection device can be realized by a computer executing givenprograms like the above-described image evaluation device 101, or can bemounted as an electronic circuit using the FPGA or the like.

FIG. 7 is an explanatory illustration showing the general configurationof the image selection device according to this embodiment. FIG. 8 is aflowchart showing the process flow of the image selection methodexecuted by the image selection device. The following explanation willbe made with reference to these figures.

As shown in FIG. 7, an image selection device 601 comprises a receiver602, an acquirer 603, and a selector 604.

When the image selection device 601 is realized by a computer executinggiven programs, first, the receiver 602 receives multiple imagesdepicting a single target as the programs have started (Step S701).

Here, the multiple images are typically recorded on a hard disc.However, the multiple images can be acquired through computercommunication networks in sequence.

Then, the acquirer 603 acquires the evaluation value of the graininess(or roughness) of each of the multiple received images from theabove-described image evaluation device 101 (Step S702).

As described above, the above-described image evaluation device 101 canevaluate the graininess (or roughness) of each image independentlywithout comparing with the original image or other images. Therefore,the graininess (or roughness) evaluation values can be calculated inparallel or concurrently.

Finally, the selector 604 selects the least rough image or an image withthe lowest entropy from the multiple received images based on theacquired graininess (or roughness) evaluation values (Step S703), andthe procedure ends.

As described above, the obtained graininess (or roughness) is theentropy of nonsmooth parts of the image. The entropy is increased whenthe image contains many noises or when the image has new information(for example, an image of a tag line character string) overwritten.

Therefore, selecting the least rough image results in selecting an imagedepicting the photographed target in an easily viewable and faithfulmanner as much as possible.

As described above, this embodiment makes it possible to properly selecta representative image from multiple images with simple calculation.

This application claims the priority based on Japanese PatentApplication No. 2012-100211, filed in Japan on Apr. 25, 2012, and thecontents of the basic application are incorporated herein to the extentthat the law of the designated country permits.

INDUSTRIAL APPLICABILITY

The present invention can provide an image evaluation device, imageselection device, image evaluation method, recording medium, and programfor properly evaluating the graininess (or roughness) of an image.

REFERENCE SIGNS LIST

-   -   101 Image evaluation device    -   102 Blurer    -   103 Differentiator    -   104 Scanner    -   105 Calculator    -   106 Outputter    -   601 Image selection device    -   602 Receiver    -   603 Acquirer    -   604 Selector

1. An image evaluation device, comprising: a blurer creating a secondimage by blurring a first image; a differentiator creating a third imagepresenting a difference in pixel value of each pixel between the firstimage and the second image; a scanner scanning pixels contained in thethird image, obtaining differences in pixel value between adjoiningpixels, and obtaining respective probabilities of occurrence of theobtained differences; a calculator calculating an entropy from therespective probabilities of occurrence of the obtained differences; andan outputter outputting the entropy as an evaluation value of agraininess of the first image.
 2. The image evaluation device accordingto claim 1, wherein: the scanner scans the pixels contained in the thirdimage from left to right and from top to bottom.
 3. The image evaluationdevice according to claim 1, wherein: the scanner scans the pixelscontained in the third image along a space-filling curve.
 4. The imageevaluation device according to claim 1, wherein: a pixel value of eachpixel contained in the third image is a distance between a pixel valueat the position of that pixel in the first image and a pixel value atthe position of that pixel in the second image in a given color space.5. The image evaluation device according to claim 1, wherein: thedifference in pixel value between the adjoining pixels is a distancebetween pixel values of the adjoining pixels in a given color space. 6.An image selection device, comprising: a receiver receiving multipleimages depicting an object; an acquirer acquiring an evaluation value ofa graininess of each of the multiple received images from the imageevaluation device according to claim 1; and a selector selecting theleast rough image from the multiple received images based on theacquired graininess evaluation values.
 7. An image evaluation methodexecuted by an image evaluation device comprising a blurer, adifferentiator, a scanner, a calculator, and an outputter, comprising: ablurring step in which the blurer creates a second image by blurring afirst image; a differentiation step in which the differentiator createsa third image presenting a difference in pixel value of each pixelbetween the first image and the second image; a scanning step in whichthe scanner scans pixels contained in the third image, obtainsdifferences in pixel value between adjoining pixels, and obtains therespective probabilities of occurrence of the obtained differences; acalculation step in which the calculator calculates an entropy from therespective probabilities of occurrence of the obtained differences; andan output step in which the outputter outputs the entropy as anevaluation value of a graininess of the first image.
 8. Acomputer-readable recording medium on which a program is recorded thatallows a computer to function as: a blurer creating a second image byblurring a first image; a differentiator creating a third imagepresenting a difference in pixel value of each pixel between the firstimage and the second image; a scanner scanning pixels contained in thethird image, obtaining differences in pixel value between adjoiningpixels, and obtaining respective probabilities of occurrence of theobtained differences; a calculator calculating an entropy from therespective probabilities of occurrence of the obtained differences; andan outputter outputting the entropy as an evaluation value of agraininess of the first image.
 9. (canceled)